<#-- 创建购物车标签 -->
<#assign cartTag= newTag("cartTag")>
<#--通过购物车标签获取购物项列表 -->
<#assign itemList = cartTag() >	
<#-- 创建会员是否登录标签 -->
<#assign memberIsLoginTag= newTag("memberIsLoginTag")>
<#-- 获取是否登录  -->
<#assign isLogin = memberIsLoginTag() >	
<div class="border">
<script type="text/javascript">
var isLogin = ${isLogin?string};
</script>
	<div id="cart_wrapper">
		<#if itemList?exists && itemList?size gt 0>
			<table cellspacing="0" cellpadding="3" width="100%" >
				<thead>
					<tr>
						<th>图片</th>
						<th>商品名称</th>
						<th>商品积分</th>
						<th>销售价格</th> 
						<th>优惠后价格</th>
						<th>数量</th>
						<th>小计</th>
						<th class="cart_last">删除</th>
					</tr>
				</thead>
				<tbody>
					<#list itemList as item >
						<tr itemid="${item.id}" productid="${item.product_id}" price="${item.coupPrice}">
							<td>
								<a target="_blank" href="goods-${item.goods_id}.html">
								<span style="display: block;height: 50px;" class="cart-product-img">
									<@image height="50" width="36" src="${item.image_default!''}" style="cursor: pointer;" />
								</span>
								</a>				
							</td>
							<td style="text-align: left;">
								<a target="_blank" href="goods-${item.goods_id}.html">${item.name}</a>
								<#if item.others?exists>
									<#if item.others.specList?exists>
										<span>
											<#list item.others.specList as spec>
												<#if spec_index!=0></#if><strong>${spec.name}:<em style="color:#ED7108">${spec.value}</em></strong>
											</#list>
										</span>
									</#if>
									<#if item.others.gys_name?exists>
										供应商：${item.others.gys_name!''}
									</#if>
								</#if>
							</td>
							<td>${item.point}</td>
							<td class=" mktprice1">${item.price?string("currency")}</td>
							<td>${item.coupPrice?string("currency")}</td>
							<td class="cart_quantity">
								<div id="num" class="Numinput" value="${item.num}" itemid="${item.id}" productid="${item.product_id}" >
									<span class="numadjust decrease">-</span>
									<input size="5" name="num" autocomplete="off" type="text" value="${item.num}">
									<span class="numadjust increase">+</span>
								</div>
							</td>
							<td class="itemTotal">${item.subtotal?string("currency")}</td>
							<td class="cart_last"><a href="javascript:;" class="delete">删除</a></td>
						</tr>
					</#list>
				</tbody>
			</table>
			<!-- 总价 -->
			<div class="total_wrapper">
				<#include '/cart/cartTotal.html' />
			</div>
			<div class="button_wrapper">
				<div class="btn">
					<input type="button" class="blue_btn clean_btn" value="清空购物车">
				</div>
				<div class="btn">
					<input type="button" class="returnbuy_btn" value="继续购物"  />
				</div> 	
				<div class="btn"> 		
					<input type="button"  class="checkout_btn" value="去结算"   />
				</div>
			</div>
			<div id="login_tip" style="display:none">
				<div class="message">
					您当前是游客身份，游客身份不能购买商品！ <br /> <br />
				</div>
				<div class="button_wrapper">
					<div class="btn">
					<input type="button" class="green_btn to_login_btn" value="马上登录">
					</div>
					
					<div class="btn">
					<input type="button" class="yellow_btn to_register_btn"  value="注册">
					</div>
				</div>
			</div>
		<#else>
			您的购物车中暂无商品，赶快<a href="index.html">挑选心爱的商品</a>吧！
		</#if>
	</div>
</div>

